export enum DiagramTitleType {
  Common = "Common",
  Name = "Name",
  Properties = "Properties"
}

type DiagramTitleProperty = {
  type: "string" | "property"; // 类型，普通字符或属性的key
  value: string; // 如果是普通字符，value里存储字符的值
};
type TitleConfig = {
  type: DiagramTitleType;
  showDiagramType: boolean;
  properties?: DiagramTitleProperty[]; // 自定义属性的配置，type是Properties时才有此字段
};

import { DiagramCustomizationManagementModel } from "../../DiagramCustomizationManagementModel";

export class DiagramHeaderModel {
  titleConfig: TitleConfig = {
    type: DiagramTitleType.Common,
    showDiagramType: false
  };
  constructor(public diagramCustomizationManagementModel: DiagramCustomizationManagementModel) {
    //   this.stereotypeModelId = query.stereotypeModelId;
  }

  initDiagramHerderData(titleConfig) {
    if (titleConfig) {
      this.titleConfig = titleConfig;
    }
    /*   if (configurationDisabled) {
      this.titleConfig.type = DiagramTitleType.Common;
    } */
  }

  changeShowMethod(val: DiagramTitleType) {
    this.titleConfig.type = val;
  }
}
